#include"ACUAS.h"
#include"ACUASLCD-CSlab.h"

int main()
{
	DDRA  = 0b00000000; 
	PORTA = 0b11111111; 
	DDRC  = 0b11111111; 
	PORTC = 0b11111111;
	ACTIVATE_LCD
	ACTIVATE_ADC

	VAR16(xcali=0)
	VAR16(ycali=0)

	while(1){
		ADC_CHANNEL(1)
		ADCONVERT_MV(xcali)
		LCD_XY(1,2)
		LCD_NUMBER(xcali)

		ADC_CHANNEL(2)
		ADCONVERT_MV(ycali)
		LCD_XY(7,2)
		LCD_NUMBER(ycali)
	}

//	int i;
//	for(i=0;i<100;i++){
//		LCD_TEXT("CALI DATA:")

		LCD_XY(1,2)
		LCD_NUMBER(xcali)

		LCD_XY(7,2)
		LCD_NUMBER(ycali)
//	}

	/*while(1){

	VAR16(xdeg=0)
	VAR16(ydeg=0)

	ADC_CHANNEL(1)
	ADCONVERT_MV(xdeg)
	ADC_CHANNEL(2)
	ADCONVERT_MV(ydeg)


	LCD_XY(1,2)
	LCD_NUMBER((xdeg-xcali)*0.1125)
	LCD_XY(7,2)
	LCD_NUMBER((ydeg-ycali)*0.1125)
	
	}*/
		

	return 0;
}
